<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">  
  <title>家具详细信息</title>
 </head>
 <body>
 
 <?php
  require_once('inc_admin.php');

  connect();
  //编写sql语句
  $id = $_GET['id'];
$sql="select jiaju.*,category.zqy_cname from jiaju left join category on jiaju.zqy_cid=category.zqy_cid where jiaju.zqy_id={$id}";

 
  $result = fetch_array($sql); 

 ?>

 <center><h3>家具详细信息</h3></center>
 <table align="center" width="80%" border=1> 
 <tr>
   <th>编号</th>
   <th>家具名称</th>   
   <th>家具品牌</th>
   <th>家具介绍</th>
   <th>家具类别</th>
   <th>家具上传时间</th>
   <th>家具上传文件名</th>
   <th>审核情况</th> 
   <th>操作</th>
 </tr>

 <?php
  foreach ($result as $row) {
   echo '<tr>';
   echo '<td>'.$row['zqy_id'].'</td>';
   echo '<td>'.$row['zqy_name'].'</td>'; 
   echo '<td>'.$row['zqy_brand'].'</td>';
   echo '<td>'.$row['zqy_intro'].'</td>';
   echo '<td>'.$row['zqy_cname'].'</td>'; 

   echo '<td>'.$row['zqy_adddate'].'</td>';
   echo '<td>'.$row['zqy_jiajulink'].'</td>';
   if ($row['zqy_jiajulink'])
    {
     echo'<td>'.'已经审核'.'</td>';
   }
   else
    {echo '<td>'.'未经审核'.'</td>';}

   echo '<td><a href="">修改</a> | 
   <a href="delflower.php?id='.$row['zqy_id'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a>| 
   <a href="list.php?id='.$row['zqy_id'].' ">返回</a></td>';
   echo '</tr>';  
  }
  echo '</table>';  
  $totalrows = count($result);
  echo "<table align='center'><tr><td>共有{$totalrows}条记录</td></tr></table>";   
 ?>
 
 </body>
</html>